﻿namespace VXCompany.SilverlightLogging.Services.Exceptions
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
	using VXCompany.SilverlightLogging.Services.ServiceContracts;

	/// <summary>
	/// Client Exception.
	/// </summary>
    public abstract class ClientException : Exception
    {
        #region Constructors

		/// <summary>
		/// Creates new instance.
		/// </summary>
        public ClientException()
        {
        }

		/// <summary>
		/// Creates new instance, with inner exception.
		/// </summary>
		/// <param name="inner"></param>
        public ClientException(Exception inner)
            : base(null, inner)
        {        
		}

		/// <summary>
		/// Creates new instance, with inner exception and message.
		/// </summary>
		/// <param name="message"></param>
		/// <param name="inner"></param>
        public ClientException(String message, Exception inner)
            : base(message, inner)
        {
        }


		/// <summary>
		/// Creates new instance, with message.
		/// </summary>
		/// <param name="message"></param>
        public ClientException(String message)
            : base(message)
        {
        }

        #endregion Constructors

        #region Properties

		/// <summary>
		/// Gets or sets IP of client
		/// </summary>
        public string ClientAddress
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the client application name.
        /// </summary>
        public string ClientApplication
        {
            get; set;
        }

		/// <summary>
		/// Gets or sets error level.
		/// </summary>
        public ErrorLevel Level
        {
            get;
            set;
        }

		/// <summary>
		/// Gets or sets message data dictionary.
		/// </summary>
        public Dictionary<string, object> MessageData
        {
            get;
            set;
        }

		/// <summary>
		/// Gets or sets inner exceptionmessage.
		/// </summary>
        public ExceptionMessage MessageInnerException
        {
            get;
            set;
        }

		/// <summary>
		/// Gets or sets UserID for authenticated user.
		/// </summary>
        public string UserID
        {
            get;
            set;
        }

        #endregion Properties
    }
}